<?php

namespace App\Model\Business;

use App\Model\Model;

class BlackOaid extends Model
{
    protected ?string $connection = "business";

    protected ?string $table = "black_oaid";

    public static function findBlackOaid($channel, $oaid)
    {
        if (!$oaid) {
            return null;
        }

        return self::query()->where("channel", $channel)
            ->where("oaid", $oaid)
            ->where("is_deleted", 0)
            ->first();
    }
}